import request from '@/router/axios';
import {
  fenExYuangettoFixed, getAppealTypes, getIs_sup_payment,
  getLineName, getMappingStatus,
  getNoticeStates,
  getStationName, is_sup_payment,getSupp_state_status,supp_state_status,
  allStatus
} from "../../../../subwayRat/commonCheck";

/**
 * 列表
 * @param query
 */
export function getSwAuConductorNoticeList(query) {
  return request({
    url: '/check/checkNew/getSwAuConductorNoticeList',
    method: 'post',
    params: query,
    data:query,
  })
}

/**
 * 修改
 * @param query
 */
export function updateSwAuConductorNotice(query) {
  return request({
    url: '/check/checkNew/updateSwAuConductorNotice',
    method: 'post',
    params: query,
    data:query,
  })
}

/**
 * 修改
 * @param query
 */
export function recallAppealSwAuConductorNotice(query) {
  return request({
    url: '/check/checkNew/recallAppealSwAuConductorNotice',
    method: 'post',
    params: query,
    data:query,
  })
}
/**
 * 确认
 * @param query
 */
export function affirmSwAuConductorNotice(query) {
  return request({
    url: '/check/checkNew/affirmNotice',
    method: 'post',
    params: query,
    data:query,
  })
}


export function get_xw_spy_ZN_Option() {
  return {
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: true,
    reserveSelection: false,
    height: 450,
    column: [
      {label: "收入日期", prop: "recordTime",type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd'},
      {label: "差异金额", prop: "differenceAmount",formatter:function (row,v) {
          return fenExYuangettoFixed(row,'differenceAmount');
        }},
      {label: "售票员", prop: "conductorPersonName",type:'select',search:true,searchslot:true},
      {label: "员工号", prop: "conductorPersonCode"},
      {label: "申诉状态", prop: "appealStatus",type:'select',dicData:allStatus['car_appeal_status'],search:true,
        formatter:function (row,v) {
          return getMappingStatus('car_appeal_status',v);
        }},
      {label: "是否补款",hide: true, prop: "isSupPayment",type:'select',dicData:supp_state_status(),formatter:function (row,v) {
          return getSupp_state_status(v);
        }},
        {label: "下发时间", prop: "sendTime",type:'date',format:'yyyy-MM-dd HH:mm:ss',valueFormat:'yyyy-MM-dd HH:mm:ss',width: 90},
      {label: "最晚回复期限(天)", prop: "replyPeriod"},
      {label: "备注", prop: "remark",hide: true},
      {label: "申诉回复", prop: "appealReply",hide: true},
    ]
  }
}
